package com.easytouch.core.model;

import java.io.Serializable;

/**
 * 货道模型类
 * Created by gulin on 2016/3/25.
 */
public class ColumnModel implements Serializable
{
    public static final int TEMPERATURE_NORMAL = 0;
    public static final int TEMPERATURE_COLD = 1;
    public static final int TEMPERATURE_HEAT = 2;

    public boolean isBreak; //货道是否故障
    public int num; //商品存量,饮料机为出货数量
    public int goodsId; //商品ID
    public int price; //以分为单位的价格
    public int maxStock; //最大库存量
    public int temperatureState; //温度状态

    public ColumnModel()
    {
        isBreak = true;
        num = 0;
        goodsId = 0;
        price = 0;
        maxStock = 1;
        temperatureState = TEMPERATURE_NORMAL;
    }

    public ColumnModel(final boolean isBreak, final int num, final int goodsId, final int price)
    {
        this.isBreak = isBreak;
        this.num = num;
        this.goodsId = goodsId;
        this.price = price;
        maxStock = 1;
        temperatureState = TEMPERATURE_NORMAL;
    }

    @Override
    public String toString()
    {
        return (isBreak ? "1" : "0") + "," + num + "," + goodsId + "," + price + "," + maxStock;
    }
}
